CONTENTS | INDEX | PREV | NEXT
 GetDiceRexxPortSlot

 FUNCTION
 Determine an Application ARexx slot (DICE)

 SYNTAX
 #include <lib/rexx.h>
 slot = GetDiceRexxPortSlot(port, &nameptr);
 int slot;
 MsgPort *port;
 char *nameptr;

 DESCRIPTION
 GetDiceRexxPortSlot returns the ln_Name field of the specified port
 (i.e. the fully qualified port name) and extracts and returns the
 slot number.  -1 is returned if the port name does not terminate with
 ".xx" where xx is a number.  If a char ** pointer is passed as
 nameptr it will be initialized to point to the ln_Name field of the
 port.

 This call is normally used with port = NULL to obtain information
 about DICE's internally setup Rexx port.

 INPUTS
 struct MsgPort *port;
             message port structure to extract ln_Name and
             slot field from. You can pass NULL to extract the
             full name and slot number selected by DICE when
             automatic startup is used (i.e. your declaration
             of RexxHostName is assigned a non-NULL pointer).

 char **nameptr;     The port name or NULL.  If not NULL the pointer
             will be assigned the ln_Name field of the port.
             Normally used when port is passed as NULL to
             obtain the fully qualified rexx port name DICE
             has constructed for you in an automatic startup.

 RESULTS
 int slot;       the slot number extracted from the port name or
             -1 if the port name is not in the proper format.